def is_power_2_v1(num):
    return num & (num - 1) == 0


def is_own(num):
    return num & 1 == 0


print(is_power_2_v1(2))
print(is_power_2_v1(10))
print(is_power_2_v1(20))
print(is_power_2_v1(40))
print(is_power_2_v1(512))

print(1 & 1)
print(2 & 1)
print(3 & 1)
print(4 & 1)
